package com.ruoyi.technicianAudit.service.impl;

import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.technicianAudit.domain.TechnicianAvatarAudit;
import com.ruoyi.technicianAudit.mapper.TechnicianAvatarAuditMapper;
import com.ruoyi.technicianAudit.service.ITechnicianAvatarAuditService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 头像审核Service业务层处理
 *
 * @author ruoyi
 * @date 2025-04-07
 */
@Service
public class TechnicianAvatarAuditServiceImpl implements ITechnicianAvatarAuditService {
    @Autowired
    private TechnicianAvatarAuditMapper technicianAvatarAuditMapper;

    /**
     * 查询头像审核
     *
     * @param id 头像审核主键
     * @return 头像审核
     */
    @Override
    public TechnicianAvatarAudit selectTechnicianAvatarAuditById(Long id) {
        return technicianAvatarAuditMapper.selectTechnicianAvatarAuditById(id);
    }

    /**
     * 查询头像审核列表
     *
     * @param technicianAvatarAudit 头像审核
     * @return 头像审核
     */
    @Override
    public List<TechnicianAvatarAudit> selectTechnicianAvatarAuditList(TechnicianAvatarAudit technicianAvatarAudit) {
        return technicianAvatarAuditMapper.selectTechnicianAvatarAuditList(technicianAvatarAudit);
    }

    /**
     * 新增头像审核
     *
     * @param technicianAvatarAudit 头像审核
     * @return 结果
     */
    @Override
    public int insertTechnicianAvatarAudit(TechnicianAvatarAudit technicianAvatarAudit) {
        technicianAvatarAudit.setCreateTime(DateUtils.getNowDate());
        return technicianAvatarAuditMapper.insertTechnicianAvatarAudit(technicianAvatarAudit);
    }

    /**
     * 修改头像审核
     *
     * @param technicianAvatarAudit 头像审核
     * @return 结果
     */
    @Override
    public int updateTechnicianAvatarAudit(TechnicianAvatarAudit technicianAvatarAudit) {
        technicianAvatarAudit.setUpdateTime(DateUtils.getNowDate());
        return technicianAvatarAuditMapper.updateTechnicianAvatarAudit(technicianAvatarAudit);
    }

    /**
     * 批量删除头像审核
     *
     * @param ids 需要删除的头像审核主键
     * @return 结果
     */
    @Override
    public int deleteTechnicianAvatarAuditByIds(Long[] ids) {
        return technicianAvatarAuditMapper.deleteTechnicianAvatarAuditByIds(ids);
    }

    /**
     * 删除头像审核信息
     *
     * @param id 头像审核主键
     * @return 结果
     */
    @Override
    public int deleteTechnicianAvatarAuditById(Long id) {
        return technicianAvatarAuditMapper.deleteTechnicianAvatarAuditById(id);
    }
}
